package com.example.eci_quartz.cloudcc.commcon;

import java.sql.SQLException;
import java.text.ParseException;


public class DateUtil {

	  public static String getDatetoStringUtil(String dateString){
		  java.text.SimpleDateFormat sdf1=new java.text.SimpleDateFormat("yyyyMMdd");
		  java.text.SimpleDateFormat sdf2=new java.text.SimpleDateFormat("yyyy-MM-dd");
		  String data="";
			  try {
		       if(dateString!=null&& !"".equals(dateString)&&!"0".equals(dateString)){
		    	   java.util.Date d= sdf1.parse(dateString);
				   if(d!=null){
					  data=sdf2.format(d);
				   }
			    }

			} catch (ParseException e) {
				e.printStackTrace();
		  }

		  return data;
	  }



}
